﻿using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.Modularity;
using Volo.Abp.VirtualFileSystem;

namespace Bangle.Abp.TagHelperPlus
{
    [DependsOn(typeof(AbpAspNetCoreMvcUiBootstrapModule))]
    public class BangleAbpTagHelperPlusModule : AbpModule
    {
        public override void ConfigureServices(ServiceConfigurationContext context)
        {
            Configure<AbpVirtualFileSystemOptions>(options =>
            {
                options.FileSets.AddEmbedded<AbpAspNetCoreMvcUiBootstrapModule>("Bangle.Abp.TagHelperPlus");
            });

            Configure<AbpVirtualFileSystemOptions>(options =>
            {
                options.FileSets.AddEmbedded<BangleAbpTagHelperPlusModule>();
            });

            Configure<AbpBundlingOptions>(options =>
            {
                options.StyleBundles.Configure(
                  TagHelperPlusBasicThemeBundles.Styles.Global,
                  bundle =>
                  {
                      bundle.AddFiles("/libs/bangle/TagHelperPlus/css/FormInline.css");
                  }
              );

                options.ScriptBundles.Configure(
                    TagHelperPlusBasicThemeBundles.Scripts.Global,
                    bundle =>
                    {
                        bundle.AddFiles("/libs/bangle/TagHelperPlus/js/DateRange.js");
                    }
                );
            });
        }
    }
}
